﻿using System;
namespace Moonlite.ExtensionApi
{
    public static class ExtensionExceptionBuilder
    {
        public static void ThrowExtensionException(Exception exception, Type extensionType)
        {
            throw new ExtensionException(exceptionMessage: exception.Message, extensionType: extensionType, callStack: exception.StackTrace);
        }

        public static void ThrowExtensionException(string message, Type extensionType, string callStack)
        {
            throw new ExtensionException(exceptionMessage: message, extensionType: extensionType, callStack: callStack);
        }
    }
}
